1. Technical Field
This application relates to the field of memory management, and more particularly to the field of managing dynamically allocated computer memory.
2. Description of Related Art
Host processor systems may store and retrieve data using a storage device containing a plurality of host interface units (host adapters), disk drives, and disk interface units (disk adapters). Such storage devices are provided, for example, by EMC Corporation of Hopkinton, Mass. and disclosed in U.S. Pat. No. 5,206,939 to Yanai et al., U.S. Pat. No. 5,778,394 to Galtzur et al., U.S. Pat. No. 5,845,147 to Vishlitzky et al., and U.S. Pat. No. 5,857,208 to Ofek. The host systems access the storage device through a plurality of channels provided therewith. Host systems provide data and access control information through the channels of the storage device and the storage device provides data to the host systems also through the channels. The host systems do not address the disk drives of the storage device directly, but rather, access what appears to the host systems as a plurality of logical volumes. The logical volumes may or may nor correspond to the actual disk drives.
The host adapters, disk adapters, and other internal components of the storage device (such as RDF adapters, RA's) may each have their own local processor and operating system. Each request to an internal component of the storage device may be scheduled as a task that is serviced by the operating system of the internal component. In some cases, a task may temporarily need a block of memory for its processing. In those cases, it may be useful for the operating system to be able to dynamically obtain and release blocks of memory for temporary usage by the tasks. Conventionally, the available, unused, memory is maintained in a heap, and an operating system services memory requests by returning a portion of the heap memory to the requesting task. Once the requesting task has used the memory, the task calls a routine to return the memory to the heap.
In some cases, the memory may be shared among multiple processing units. When one of the processing units performs a reset, part of the reset processing includes restoring previously allocated memory to the heap for reallocation. In other words, if a first processing unit performs a reset while a second processing unit is currently using allocated memory portions from the heap, the operations of the second processing unit using the allocated memory portions are interrupted. The allocated memory portions are restored to the heap for reallocation.
It may be desirable to have a special reset mode which preserves the contents of selective portions of allocated memory used so that when a special reset is performed, the contents of the selective portions are preserved.